package no.sachmuld.methodcombination.examples.reflection.strategy.v0;


/**
 *
 */
public class Main  implements Runnable {

    @Override
    public void run() {

        Duck[] ducks = {
                new MallardDuck(),
                new DecoyDuck(),
                new RubberDuck()
        };

        for (Duck duck : ducks) {
            System.out.println(duck.getClass().getSimpleName() + ":");
            System.out.print("  ");
            duck.fly();
            System.out.print("  ");
            duck.quack();
            System.out.println();
        }

    }
}
